package pt.mauromad.guias.bean;

import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import pt.mauromad.guias.dao.AddressDao;

public class CompanyBean {
	private Long id;

	@NotNull
	private String name;

	@NotNull
	@Pattern(regexp = "\\d{9}")
	private String fiscalNumber;

	private List<AddressDao> addresses;

	private Boolean enabled;

	private AddressBean address;

	private AddressDao mainAddress;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFiscalNumber() {
		return fiscalNumber;
	}

	public void setFiscalNumber(String fiscalNumber) {
		this.fiscalNumber = fiscalNumber;
	}

	public AddressBean getAddress() {
		return address;
	}

	public void setAddress(AddressBean address) {
		this.address = address;
	}

	public List<AddressDao> getAddresses() {
		return addresses;
	}

	public void setAddresses(List<AddressDao> addresses) {
		this.addresses = addresses;
	}

	public Boolean getEnabled() {
		return enabled == null ? false : enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public AddressDao getMainAddress() {
		return mainAddress;
	}

	public void setMainAddress(AddressDao mainAddress) {
		this.mainAddress = mainAddress;
	}
}
